<!-- 企业涉诉 -->
<template>
  <div class="info">
    <section class="info-block">
      <p>司法失信条数：{{ enterpriseLitigationInfo && enterpriseLitigationInfo.sxCount }}</p>
      <p>审判流程信息条数：{{ enterpriseLitigationInfo && enterpriseLitigationInfo.spCount }}</p>
      <p>税务行政执法信息条数：{{ enterpriseLitigationInfo && enterpriseLitigationInfo.swCount }}</p>
      <p>司法执行信息条数：{{ enterpriseLitigationInfo && enterpriseLitigationInfo.zxCount }}</p>
      <p>开庭公告信息条数：{{ enterpriseLitigationInfo && enterpriseLitigationInfo.ktCount }}</p>
    </section>
    <nav class="common-nav mb20">
      <h2
        style="width: 120px"
        class="common-nav__title"
        :class="index === activeIndex ? 'tab_active' : ''"
        @click="switchNav(item, index)"
        v-for="(item, index) in navList"
        :key="index"
      >
        {{ item.name }}
      </h2>
    </nav>
    <main>
      <AdministrativePenalties
        :administrativePenalties="administrativePenalties"
        v-show="activeIndex === 0"
      ></AdministrativePenalties>
      <JudicialExecution :judicialExecution="judicialExecution" v-show="activeIndex === 1"></JudicialExecution>
      <!-- <JudicialCase v-show="activeIndex === 2"></JudicialCase> -->
      <JudicialDishonesty :judicialDishonesty="judicialDishonesty" v-show="activeIndex === 2"></JudicialDishonesty>
      <TaxEnforcement :taxEnforcement="taxEnforcement" v-show="activeIndex === 3"></TaxEnforcement>
      <!-- <Announcements v-show="activeIndex === 5"></Announcements> -->
    </main>
  </div>
</template>

<script>
import AdministrativePenalties from '@/components/AdministrativePenalties/index.vue'
// import JudicialCase from '@/components/JudicialCase/index.vue'
import JudicialExecution from '@/components/JudicialExecution/index.vue'
import JudicialDishonesty from '@/components/JudicialDishonesty/index.vue'
import TaxEnforcement from '@/components/TaxEnforcement/index.vue'
// import Announcements from '@/components/Announcements/index.vue'

export default {
  name: 'EnterpriseLitigationInfo',
  props: {
    enterpriseLitigationInfo: Object,
    administrativePenalties: Array,
    judicialExecution: Array,
    judicialDishonesty: Array,
    taxEnforcement: Array,
  },
  components: {
    AdministrativePenalties,
    // JudicialCase,
    JudicialExecution,
    JudicialDishonesty,
    TaxEnforcement,
    // Announcements,
  },
  data() {
    return {
      activeIndex: 0,
      navList: [
        { name: '工商行政处罚', id: 1 },
        { name: '司法执行', id: 2 },
        // { name: '司法案例', id: 3 },
        { name: '司法失信', id: 3 },
        { name: '税务执法', id: 4 },
        // { name: '其他公告', id: 6 },
      ],
    }
  },
  methods: {
    switchNav(item, index) {
      if (this.activeIndex === index) return
      this.activeIndex = index
    },
  },
}
</script>

<style lang="scss" scoped>
.info {
  &-block {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    color: $gray;
    font-size: $f-s-16;
    margin-bottom: 8px;

    > p {
      width: 50%;
      margin-bottom: 10px;
    }
  }
}
</style>
